package com.yiren.backstage.currency.entity;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;

import java.io.Serializable;
import java.util.HashMap;

/**
 * @author lwb
 * @date :2021/12/23 9:31
 * @description: 轨迹
 */
@Entity(nameInDb = "trajectory", createInDb = false)
public class TrajectoryEntity implements Serializable {

    private static final long serialVersionUID = -1592426748720076658L;

    @Id
    @Property(nameInDb = "trajectory_id")
    private String Id;

    /*** 轨迹类型 */
    @Property(nameInDb = "trajectory_type")
    private int trajectoryType;

    /*** 线宽 */
    @Property(nameInDb = "line_width")
    private int lineWidth;

    /*** 采集方向 1：正向采集 2：逆向采集 */
    @Property(nameInDb = "collect_direction")
    private int collectDirection;

    /*** 线颜色 1:白色 2：黄色 */
    @Property(nameInDb = "line_color")
    private int lineColor;

    /*** 创建时间 */
    @Property(nameInDb = "CREATE_TM")
    protected String createTm;

    /*** 创建者 */
    @Property(nameInDb = "CREATE_USER")
    protected String createUser;

    /*** 最后修改时间 */
    @Property(nameInDb = "LAST_MODIFY_TM")
    protected String lastModifyTm;

    /*** 最后修改者 */
    @Property(nameInDb = "LAST_MODIFY_USER")
    protected String lastModifyUser;

    /*** 版本 */
    @Property(nameInDb = "VER")
    protected Long ver;

    /*** 同步状态(0：无需同步  1：修改同步  2：新增同步  3：删除同步) */
    @Property(nameInDb = "SYN_STATE")
    protected Integer synState;

    @Generated(hash = 987840854)
    public TrajectoryEntity(String Id, int trajectoryType, int lineWidth,
            int collectDirection, int lineColor, String createTm, String createUser,
            String lastModifyTm, String lastModifyUser, Long ver,
            Integer synState) {
        this.Id = Id;
        this.trajectoryType = trajectoryType;
        this.lineWidth = lineWidth;
        this.collectDirection = collectDirection;
        this.lineColor = lineColor;
        this.createTm = createTm;
        this.createUser = createUser;
        this.lastModifyTm = lastModifyTm;
        this.lastModifyUser = lastModifyUser;
        this.ver = ver;
        this.synState = synState;
    }

    @Generated(hash = 670491319)
    public TrajectoryEntity() {
    }

    public static HashMap<Integer, String> getTrajectoryTypes() {
        HashMap<Integer, String> map = new HashMap<>();
        map.put(0, "多车道采集");
        map.put(1, "实线");
        map.put(2, "虚线");
        map.put(3, "人行横道线");
        map.put(4, "停止线");
        map.put(5, "网状线");
        map.put(6, "中心圈");
        map.put(7, "起步靠边实线");
        map.put(8, "禁止停车区域");
        map.put(9, "双实线");
        map.put(10, "路口直行标识");
        map.put(11, "路口右转标识");
        map.put(12, "路口左转标识");
        map.put(13, "路口掉头标识");
        map.put(14, "路口直行左转标识");
        map.put(15, "路口直行右转标识");
        map.put(16, "路口直行掉头标识");
        map.put(17, "路口左转掉头标识");
        map.put(18, "路口直行左转掉头标识");
        map.put(19, "双虚线");
        map.put(20, "虚实线");
        map.put(21, "路口左右转标识");
        map.put(22, "刹车区域");
        return map;
    }

    public static int getTrajectoryType(String trajectoryName) {
        int trajectoryType = -1;
        switch (trajectoryName) {
            case "多车道采集":
                trajectoryType = 0;
                break;
            case "实线":
                trajectoryType = 1;
                break;
            case "虚线":
                trajectoryType = 2;
                break;
            case "人行横道线":
                trajectoryType = 3;
                break;
            case "停止线":
                trajectoryType = 4;
                break;
            case "网状线":
                trajectoryType = 5;
                break;
            case "中心圈":
                trajectoryType = 6;
                break;
            case "起步靠边实线":
                trajectoryType = 7;
                break;
            case "禁止停车区域":
                trajectoryType = 8;
                break;
            case "双实线":
                trajectoryType = 9;
                break;
            case "路口直行标识":
                trajectoryType = 10;
                break;
            case "路口右转标识":
                trajectoryType = 11;
                break;
            case "路口左转标识":
                trajectoryType = 12;
                break;
            case "路口掉头标识":
                trajectoryType = 13;
                break;
            case "路口直行左转标识":
                trajectoryType = 14;
                break;
            case "路口直行右转标识":
                trajectoryType = 15;
                break;
            case "路口直行掉头标识":
                trajectoryType = 16;
                break;
            case "路口左转掉头标识":
                trajectoryType = 17;
                break;
            case "路口直行左转掉头标识":
                trajectoryType = 18;
                break;
            case "双虚线":
                trajectoryType = 19;
                break;
            case "虚实线":
                trajectoryType = 20;
                break;
            case "路口左右转标识":
                trajectoryType = 21;
                break;
            case "刹车区域":
                trajectoryType = 22;
                break;
        }
        return trajectoryType;
    }

    /**
     * 获取轨迹可采集类型
     */
    public static HashMap<Integer, String> getTrajectoryCollectType() {
        HashMap<Integer, String> map = new HashMap<>();
        map.put(0, "道路线");
        map.put(1, "车道中心线");
        map.put(2, "多车道采集");
        map.put(3, "人行横道线");
        map.put(4, "停止线");
        map.put(5, "中心圈");
        map.put(6, "道路标识");
        map.put(7, "网状线");
        map.put(8, "禁止停车区域");
        map.put(9, "刹车区域");
        return map;
    }

    public String getId() {
        return this.Id;
    }

    public void setId(String Id) {
        this.Id = Id;
    }

    public int getTrajectoryType() {
        return this.trajectoryType;
    }

    public void setTrajectoryType(int trajectoryType) {
        this.trajectoryType = trajectoryType;
    }

    public int getLineWidth() {
        return this.lineWidth;
    }

    public void setLineWidth(int lineWidth) {
        this.lineWidth = lineWidth;
    }

    public int getCollectDirection() {
        return this.collectDirection;
    }

    public void setCollectDirection(int collectDirection) {
        this.collectDirection = collectDirection;
    }

    public int getLineColor() {
        return this.lineColor;
    }

    public void setLineColor(int lineColor) {
        this.lineColor = lineColor;
    }

    public String getCreateTm() {
        return this.createTm;
    }

    public void setCreateTm(String createTm) {
        this.createTm = createTm;
    }

    public String getCreateUser() {
        return this.createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getLastModifyTm() {
        return this.lastModifyTm;
    }

    public void setLastModifyTm(String lastModifyTm) {
        this.lastModifyTm = lastModifyTm;
    }

    public String getLastModifyUser() {
        return this.lastModifyUser;
    }

    public void setLastModifyUser(String lastModifyUser) {
        this.lastModifyUser = lastModifyUser;
    }

    public Long getVer() {
        return this.ver;
    }

    public void setVer(Long ver) {
        this.ver = ver;
    }

    public Integer getSynState() {
        return this.synState;
    }

    public void setSynState(Integer synState) {
        this.synState = synState;
    }
    

}